/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qsdm.es.persistence;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author alberto
 */
@Embeddable
public class CalendariocursoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "mes", nullable = false)
    private int mes;
    @Basic(optional = false)
    @Column(name = "Curso_id", nullable = false)
    private int cursoid;

    public CalendariocursoPK() {
    }

    public CalendariocursoPK(int mes, int cursoid) {
        this.mes = mes;
        this.cursoid = cursoid;
    }

    public int getMes() {
        return mes;
    }

    public void setMes(int mes) {
        this.mes = mes;
    }

    public int getCursoid() {
        return cursoid;
    }

    public void setCursoid(int cursoid) {
        this.cursoid = cursoid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) mes;
        hash += (int) cursoid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CalendariocursoPK)) {
            return false;
        }
        CalendariocursoPK other = (CalendariocursoPK) object;
        if (this.mes != other.mes) {
            return false;
        }
        if (this.cursoid != other.cursoid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsdm.es.persistence.CalendariocursoPK[ mes=" + mes + ", cursoid=" + cursoid + " ]";
    }
    
}
